﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;

namespace ControllerLayer.MainView
{
    public class SearchViewController
    {

        public static DataTable FillGridWithRange(DataGridView grid, int index)
        {
            int start = index * 3;
            int end = start + 3;

            DataTable table = new DataTable();

            for (int i = 0; i < grid.Rows.Count; i++)
            {
                if ((i >= start && i <= end))
                {
                    table.Rows.Add(grid.Rows[i]);
                }
            }
            return table;

        }
    }
}
